<template>
    <div class="charts" ref="charts">

    </div>
</template>

<script>
import * as echarts from 'echarts'
export default {
    name: 'BarCharts',
    mounted() {
        // 初始化echarts实例
        let lineCharts = echarts.init(this.$refs.charts)
        lineCharts.setOption({
            xAxis: {
                show: false,
                type: 'category'
            },
            yAxis: {
                show: false
            },
            series: [
                {
                    type: 'bar',
                    data: [30, 7, 49, 12, 48, 99, 40, 6, 3, 9, 70, 50],
                    color: '#0a67d8'
                }
            ],
            // 布局调试
            grid: {
                left: 10,
                right: 10,
                top: 10,
                bottom: 10
            },
            tooltip: {}
        })
    }
}
</script>

<style>
.charts {
    height: 100%;
    width: 100%;
}
</style>